<template>
  <a-result
    status="404"
    title="404"
    sub-title="抱歉，您访问的页面不存在"
  >
    <template #extra>
      <a-button type="primary" @click="goHome">
        <template #icon><HomeOutlined /></template>
        返回首页
      </a-button>
    </template>
  </a-result>
</template>

<script setup>
import { HomeOutlined } from '@ant-design/icons-vue';
import { useRouter } from 'vue-router';
import 'ant-design-vue/dist/reset.css'; // 新增：引入基础样式

const router = useRouter();
const goHome = () => {
  router.push('/');
};
</script>

<style scoped>
.ant-result {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: -60px; /* 抵消默认的上边距 */
}

/* 响应式调整 */
@media (max-width: 768px) {
  .ant-result {
    padding: 0 16px;
  }
  
  :deep(.ant-result-title) {
    font-size: 48px !important;
  }
  
  :deep(.ant-result-subtitle) {
    font-size: 16px !important;
  }
}
</style>